\section{sizeof --- Absolute Value}
\label{fn:sizeof}
\index{sizeof()}
\index{}
\index{}
\begin{rail}
SizeOf : 'sizeof' '(' ((Scalar) | (Matrix) | (String) | (List)) ')' ;
\end{rail}

The \verb+sizeof+ function returns the number of bytes of data in the
argument.  This is somewhat machine dependent; though in general, the
size of a:
\begin{description}
 \item[real scalar] is the same as a C double type.
 \item[complex scalar] is twice as large as a real scalar.
 \item[matrix] is equal to the number of elements multiplied by the
   size of the elements (real or complex).
 \item[string] is equal to the number of characters.
 \item[list] is equal to the sum of the sizes of the elements, assuming real
scalars are promoted to complex scalars within the list.
\end{description}

\paragraph{Example}
\index{example of sizeof()}
\index{sizeof()!example}
\begin{verbatim}
> sizeof(2.432)
        8
> sizeof(1+3j)
       16
> a = rand(2,4)
 a =
        1      0.647     0.0369      0.665
    0.975      0.333      0.162     0.0847
> sizeof(a)
       64
> sizeof("1234567890")
       10
> str = "This string has 29 characters"
 str =
This string has 29 characters
> sizeof(str)
       29
> sizeof(<<2>>)
       16
> sizeof(<<3+3j>>)
       16
> sizeof(<<MatrixA = a>>)
       64
\end{verbatim}

See also: Page~\pageref{fn:size} \verb+size()+,
Page~\pageref{fn:who} \verb+who()+,
Page~\pageref{fn:whos} \verb+whos()+.

\newpage





